#include <iostream>
#include <string.h>
#include <math.h>
#include <stdio.h>
using namespace std;
static int n = 0;
double points[16][2]; 
double dists[16][16]; 
int usedPath[16];

double dist(double x1, double y1, double x2, double y2){
	return sqrt(pow(x1-x2, 2.0)+pow(y1-y2,2.0));
}

double minDist(int startPoint, int* usedPath, int usedSize){
    double md = 1000000, temp;
    int newUsedPath[n];
    for(int i=1;i<n;i++){
    	if(i==startPoint) continue;
    	if(usedPath[i]!=0){
    		if(usedSize == n-1){
        		return dists[startPoint][i];
			}
        	memcpy(newUsedPath, usedPath, n);
   	    	newUsedPath[i] = 0;
       		temp = minDist(i, newUsedPath, usedSize+1)+dists[startPoint][i];
       		newUsedPath[i] = 1;
       		md = min(md, temp);
		}
	}
	return md;
}

int main(){
    //1. input
	cin>>n;
	n++;	
	points[0][0] = 0; 
	points[0][1] = 0; 
	for(int i=1;i<n;i++){
		cin>>points[i][0]>>points[i][1];
    	usedPath[i] = 1;
	}
	//memset(usedPath,1,sizeof(usedPath));
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			dists[i][j] = (i==j)?0:(i>j?dists[j][i]:dist(points[i][0],points[i][1],points[j][0],points[j][1]));
		}
	}	
	
	//2. calc
	usedPath[0] = 0;
	double md = minDist(0, usedPath, 1);
	printf("%.2f",md);
}
